<?php
namespace Single\Controller;
class SingleController extends ProjectController {

	public function add(){
		if (IS_GET) {
			$this -> form();
		}elseif (IS_POST) {
			$this -> ebAdd();
		}
	}

	public function save(){
		if (IS_GET) {
			$id = I('id','','intval');
			$this -> form(M('Single') -> find($id),array('single_ext_id'=>$id));
		}elseif (IS_POST) {
			$this -> ebSave();
		}
	}

	public function delete(){
		if (IS_POST) {
			$p = array(
				'relation' => array('singlefield'),
				);
			$this -> ebDelete($p);
		}
	}}